<template>
	<view class="um-star" :style="styles">
		<image class="image" src="/static/images/star5.png" mode="widthFix"></image>
	</view>
</template>

<script lang="ts" setup>
	import { computed } from 'vue';

	const props = withDefaults(defineProps<{ level : number }>(), {
		level: 5
	})

	const styles = computed(() => {
		return {
			width: props.level * 30 + "rpx"
		}
	})
</script>

<style lang="scss" scoped>
	.um-star {
		overflow: hidden;

		.image {
			width: 150rpx;
		}
	}
</style>